
<div class="form">
	<p></p>
	<form id="ndk-health-form" method="post" action="<?php echo Yii::app()->createUrl('finance/showNeraca'); ?>" target="_blank">
		<div class="row">
			<div class="col-md-4">
				<div class="widget box">

					<div class="widget-header">
						<h4><i class="icon-reorder"></i> Report Neraca </h4>
					</div>


					<div class="widget-content">
						

						<div class="control-group">
						<label class="control-label">Bulan</label>
						<div class="controls">
						<select id="bulan_bank" name="bulan_bank" class="form-control">
						<option value="01">Januari</option>
						<option value="02">Februari</option>
						<option value="03">Maret</option>
						<option value="04">April</option>
						<option value="05">Mei</option>
						<option value="06">Juni</option>
						<option value="07">Juli</option>
						<option value="08">Agustus</option>
						<option value="09">September</option>
						<option value="10">Oktober</option>
						<option value="11">November</option>
						<option value="12">Desember</option>
						</select>
						</div>
						</div>
						

						<div class="control-group">
						<label class="control-label">Tahun</label>
						<div class="controls">
						<input id="tahun_bank" class="form-control" type="text" name="tahun_bank" size="100">
						</div>
						</div>
						
						<!--
						<div class="control-group">
						<label class="control-label">Nilai Konversi Rupiah</label>
						<div class="controls">
						<input id="konversi_bank" class="form-control" type="text" name="tahun_bank" size="100">
						</div>
						</div>
						-->
					</div>

				</div>
			</div>
		</div>

		<div class="row">
			<div class="col-md-4">
				<div class="form-actions">
					<button class="btn btn-primary btn-large" id="btn_prev" type="button">Preview</button>
					<button class="btn btn-primary btn-large" name="yt0" type="submit">Cetak</button>
				</div>
			</div>
		</div>
	</form>

</div>

<div class="form">
<table class="table table-hover table-striped table-bordered table-highlight-head" id="tbl_neraca">
	<thead>
		<tr>
			<th></th>
			<th></th>
			<th>Current Year</th>
			<th>Last Year</th>
		</tr>
		<!-- <tr>
			<th> &nbsp;</th>
			<th>&nbsp;</th>
			<th>&nbsp;</th>
			<th>&nbsp;</th>
			<th>&nbsp;</th>
		</tr> -->
	</thead>
	<tbody>
	
	</tbody>
	
</div>

<script type="text/javascript">
$("#btn_prev").click(function(e){
	$.ajax({
			type:"POST",
            url:"<?php echo Yii::app()->createUrl('/Finance/showNeraca'); ?>",
			dataType:"json",
            success:function(data){
				$("#tbl_neraca tbody").html("<tr>"+
					"<td colspan='4'><b>Aktiva</b></td>" +
				"</tr>" +
				"<tr>"+
					"<td>1</td>"+
					"<td>Investasi</td>"+
					"<td>"+data.investasi+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>2</td>"+
					"<td>Kas dan Bank</td>"+
					"<td>"+data.kasdanbank+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>3</td>"+
					"<td>Piutang Premi</td>"+
					"<td>"+data.piutang_premi+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>4</td>"+
					"<td>Piutang Jasa Keperantaraan</td>"+
					"<td>"+data.piutangjasakeperantaraan+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>5</td>"+
					"<td>Biaya Bayar Dimuka</td>"+
					"<td>"+data.biayabayardimuka+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>6</td>"+
					"<td>Piutang Hasil Investasi</td>"+
					"<td>"+data.piutanghasilinvestasi+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>7</td>"+
					"<td>Piutang Pajak</td>"+
					"<td>"+data.piutangpajak+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>8</td>"+
					"<td>Piutang Lain-lain</td>"+
					"<td>"+data.piutanglainlain+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>9</td>"+
					"<td>Aktiva Tetap</td>"+
					"<td>"+data.aktivatetap+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td>10</td>"+
					"<td>Akumulasi Penyusutan</td>"+
					"<td>"+data.akumulasipenyusutan+"</td>"+
					"<td>0</td>"+
				"</tr>"+
				"<tr>"+
					"<td colspan='2' style='text-align:right'><b>Total Aktiva</b></td>" +
					"<td>"+data.total_aktiva+"</td>" +
					"<td></td>" +
				"</tr>" +
				"<tr>"+
					"<td colspan='4'><b>Pasiva</b></td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>I</b></td>" +
					"<td colspan='3'><b>Kewajiban</b></td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>I.1</b></td>" +
					"<td>Hutang Premi</td>" +
					"<td>"+data.hutang_premi+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>I.2</b></td>" +
					"<td>Hutang Komisi</td>" +
					"<td>"+data.hutangkomisi+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>I.3</b></td>" +
					"<td>Hutang Pajak</td>" +
					"<td>"+data.hutangpajak+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>I.4</b></td>" +
					"<td>Biaya Yang Masih Harus Dibayar</td>" +
					"<td>"+data.biayayangmasihharusdibayar+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>I.5</b></td>" +
					"<td>Hutang Lain-lain</td>" +
					"<td>"+data.hutanglainlain+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td colspan='2' style='text-align:right'><b>Total Kewajiban</b></td>" +
					"<td>"+data.total_kewajiban+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>I</b></td>" +
					"<td colspan='3'><b>Modal Sendiri</b></td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>II.1</b></td>" +
					"<td>Modal Disetor</td>" +
					"<td>"+data.modaldisetor+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>II.2</b></td>" +
					"<td>Agio/Disagio Saham</td>" +
					"<td>"+data.agiodisagiosaham+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>II.3</b></td>" +
					"<td>Cadangan</td>" +
					"<td>"+data.cadangan+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>II.4</b></td>" +
					"<td>Kenaikan (Penurunan) Surat Berharga</td>" +
					"<td>"+data.kenaikanpenurunansuratberharga+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>II.5</b></td>" +
					"<td>Selisih Penilaian Aktiva Tetap</td>" +
					"<td>"+data.selisihpenilaianaktivatetap+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>II.6</b></td>" +
					"<td>Laba (Rugi) Ditahan</td>" +
					"<td>"+data.labarugiditahan+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td><b>II.7</b></td>" +
					"<td>Laba (Rugi) Tahun Berjalan</td>" +
					"<td>"+data.total+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td colspan='2' style='text-align:right'><b>Total Modal Sendiri</b></td>" +
					"<td>"+data.total_modalsendiri+"</td>" +
					"<td>0</td>" +
				"</tr>" +
				"<tr>"+
					"<td colspan='4' style='text-align:right'>&nbsp;</td>" +
				"</tr>" +
				"<tr>"+
					"<td colspan='2' style='text-align:right'><b>Total Pasiva</b></td>" +
					"<td>"+data.pasiva+"</td>" +
					"<td>0</td>" +
				"</tr>" 
				);
			}
	});
});
</script>